from ddt import ddt,data,unpack,file_data
import unittest
list1=[1,2,3]
list2=[[1,3],[2,2]]
list3=[{"value1":3,"value2":2},{"value1":3,"value2":3}]

# @ddt
# class MyTest1(unittest.TestCase):
    # @data(1)
    # def test_bb1(self,value):
    #     print(value)
    #     self.assertEqual(value,1)
    #
    # @data(1,2,3)
    # def test_bb2(self,value):
    #     print(value)
    #     self.assertEqual(value,2)
    #
    # @data(*list1)
    # def test_bb3(self,value):
    #     print(value)
    #     self.assertEqual(value,2)
    # @data([2,2])
    # @unpack
    # def test_bb4(self,value1,value2):
    #     print(value1,value2)
    #     self.assertEqual(value1,value2)
    #
    # @data([3,2],[3,3])
    # @unpack
    # def test_bb5(self,value1,value2):
    #     print(value1,value2)
    #     self.assertEqual(value1,value2)
    # @data(*list2)
    # @unpack
    # def test_bb6(self,value1,value2):
    #     print(value1,value2)
    #     self.assertEqual(value1,value2)

    # @data({"value1":1,"value2":2},{"value1":2,"value2":2})
    # @unpack
    # def test_bb6(self,value1,value2):
    #     print(value1,value2)
    #     self.assertEqual(value1,value2)
    #
    # @data(*list3)
    # @unpack
    # def test_bb7(self,value1,value2):
    #     print(value1,value2)
    #     self.assertEqual(value1,value2)

@ddt

class TestMy(unittest.TestCase):
    @file_data("D:\\code\\Appium31\\data.json")
    def test_bb8(self,value):
        print(value)

if __name__ == '__main__':
    unittest.main(verbosity=2)